home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / dev / c / libiconv_src.lha / libtool < prev    next >
Encoding:
Text File  |  2000-11-07  |  75.0 KB  |  2,627 lines

  1. #! /bin/sh
  2.  
  3. # libtool - Provide generalized library-building support services.
  4. # Generated automatically by ltconfig - GNU libtool 1.2
  5. # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
  6. #
  7. # Copyright (C) 1996-1998 Free Software Foundation, Inc.
  8. # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; either version 2 of the License, or
  13. # (at your option) any later version.
  14. #
  15. # This program is distributed in the hope that it will be useful, but
  16. # WITHOUT ANY WARRANTY; without even the implied warranty of
  17. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  18. # General Public License for more details.
  19. #
  20. # You should have received a copy of the GNU General Public License
  21. # along with this program; if not, write to the Free Software
  22. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  23. #
  24. # As a special exception to the GNU General Public License, if you
  25. # distribute this file as part of a program that contains a
  26. # configuration script generated by Autoconf, you may include it under
  27. # the same distribution terms that you use for the rest of that program.
  28.  
  29. # This program was configured as follows,
  30. # on host md46909d2.utfors.se:
  31. #
  32. # CC="gcc -O" CFLAGS="" CPPFLAGS="" \
  33. # LD="/gnu/m68k-amigaos/bin/ld" NM="/bin/nm" RANLIB="ranlib" LN_S="ln -s" \
  34. #   ./autoconf/ltconfig --disable-shared --with-gcc --with-gnu-ld --no-verify ./autoconf/ltmain.sh m68k-unknown-amigaos
  35. #
  36. # Compiler and other test output produced by ltconfig, useful for
  37. # debugging ltconfig, is in ./config.log if it exists.
  38.  
  39. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  40. Xsed="sed -e s/^X//"
  41.  
  42. # The HP-UX ksh and POSIX shell print the target directory to stdout
  43. # if CDPATH is set.
  44. if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
  45.  
  46. # An echo program that does not interpret backslashes.
  47. echo="printf %s\\n"
  48.  
  49. # The version of ltconfig that generated this script.
  50. LTCONFIG_VERSION="1.2"
  51.  
  52. # Shell to use when invoking shell scripts.
  53. SHELL=/bin/sh
  54.  
  55. # Whether or not to build libtool libraries.
  56. build_libtool_libs=no
  57.  
  58. # Whether or not to build old-style libraries.
  59. build_old_libs=yes
  60.  
  61. # The host system.
  62. host_alias="m68k-unknown-amigaos"
  63. host="m68k-unknown-amigaos"
  64.  
  65. # The archiver.
  66. AR="ar"
  67.  
  68. # The default C compiler.
  69. CC="gcc -O"
  70.  
  71. # The linker used to build libraries.
  72. LD="/gnu/m68k-amigaos/bin/ld"
  73.  
  74. # Whether we need hard or soft links.
  75. LN_S="ln -s"
  76.  
  77. # A BSD-compatible nm program.
  78. NM="/bin/nm"
  79.  
  80. # The name of the directory that contains temporary libtool files.
  81. objdir=".libs"
  82.  
  83. # How to create relocatable object files.
  84. reload_flag=" -r"
  85. reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
  86.  
  87. # How to pass a linker flag through the compiler.
  88. wl="-Wl,"
  89.  
  90. # Additional compiler flags for building library objects.
  91. pic_flag=" -m68020 -resident32 -malways-restore-a4"
  92.  
  93. # Compiler flag to prevent dynamic linking.
  94. link_static_flag="-static"
  95.  
  96. # Compiler flag to turn off builtin functions.
  97. no_builtin_flag=" -fno-builtin"
  98.  
  99. # Compiler flag to allow reflexive dlopens.
  100. export_dynamic_flag_spec=""
  101.  
  102. # Library versioning type.
  103. version_type=none
  104.  
  105. # Format of library name prefix.
  106. libname_spec="lib\$name"
  107.  
  108. # List of archive names.  First name is the real one, the rest are links.
  109. # The last name is the one that the linker finds with -lNAME.
  110. library_names_spec="\$libname.ixlibrary \$libname.a"
  111.  
  112. # The coded name of the library, if different from the real name.
  113. soname_spec=""
  114.  
  115. # Commands used to build and install an old-style archive.
  116. RANLIB="ranlib"
  117. old_archive_cmds="\$AR cru \$oldlib\$oldobjs;\$RANLIB \$oldlib"
  118. old_postinstall_cmds="\$RANLIB \$oldlib;chmod 644 \$oldlib"
  119. old_postuninstall_cmds=""
  120.  
  121. # Create an old-style archive from a shared archive.
  122. old_archive_from_new_cmds=""
  123.  
  124. # Commands used to build and install a shared archive.
  125. archive_cmds="\$rm \$objdir/a2ixlibrary.data;\$echo \\\"#define NAME \$libname\\\" > \$objdir/a2ixlibrary.data;\$echo \\\"#define LIBRARY_ID 1\\\" >> \$objdir/a2ixlibrary.data;\$echo \\\"#define VERSION \$major\\\" >> \$objdir/a2ixlibrary.data;\$echo \\\"#define REVISION \$revision\\\" >> \$objdir/a2ixlibrary.data;\$AR cru \$lib\$libobjs;\$RANLIB \$lib;(cd \$objdir && a2ixlibrary -32)"
  126. postinstall_cmds=""
  127. postuninstall_cmds=""
  128.  
  129. # Flag that allows shared libraries with undefined symbols to be built.
  130. allow_undefined_flag=""
  131.  
  132. # Flag that forces no undefined symbols.
  133. no_undefined_flag=""
  134.  
  135. # Commands used to finish a libtool library installation in a directory.
  136. finish_cmds=""
  137.  
  138. # Same as above, but a single script fragment to be evaled but not shown.
  139. finish_eval="for lib in \`ls \$libdir/*.ixlibrary 2>/dev/null\`; do libname=\`\$echo \"X\$lib\" | \$Xsed -e 's%^.*/\\([^/]*\\)\\.ixlibrary\$%\\1%'\`; test \$rm /sys/libs/\${libname}_ixlibrary.a; \$show \"(cd /sys/libs && \$LN_S \$lib \${libname}_ixlibrary.a)\"; (cd /sys/libs && \$LN_S \$lib \${libname}_ixlibrary.a) || exit 1; done"
  140.  
  141. # Take the output of nm and produce a listing of raw symbols and C names.
  142. global_symbol_pipe=""
  143.  
  144. # This is the shared library runtime path variable.
  145. runpath_var=
  146.  
  147. # This is the shared library path variable.
  148. shlibpath_var=
  149.  
  150. # How to hardcode a shared library path into an executable.
  151. hardcode_action=immediate
  152.  
  153. # Flag to hardcode $libdir into a binary during linking.
  154. # This must work even if $libdir does not exist.
  155. hardcode_libdir_flag_spec="-L\$libdir"
  156.  
  157. # Whether we need a single -rpath flag with a separated argument.
  158. hardcode_libdir_separator=""
  159.  
  160. # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
  161. # resulting binary.
  162. hardcode_direct=no
  163.  
  164. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  165. # resulting binary.
  166. hardcode_minus_L=yes
  167.  
  168. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  169. # the resulting binary.
  170. hardcode_shlibpath_var=unsupported
  171.  
  172. # ltmain.sh - Provide generalized library-building support services.
  173. # NOTE: Changing this file will not affect anything until you rerun ltconfig.
  174. #
  175. # Copyright (C) 1996-1998 Free Software Foundation, Inc.
  176. # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  177. #
  178. # This program is free software; you can redistribute it and/or modify
  179. # it under the terms of the GNU General Public License as published by
  180. # the Free Software Foundation; either version 2 of the License, or
  181. # (at your option) any later version.
  182. #
  183. # This program is distributed in the hope that it will be useful, but
  184. # WITHOUT ANY WARRANTY; without even the implied warranty of
  185. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  186. # General Public License for more details.
  187. #
  188. # You should have received a copy of the GNU General Public License
  189. # along with this program; if not, write to the Free Software
  190. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  191. #
  192. # As a special exception to the GNU General Public License, if you
  193. # distribute this file as part of a program that contains a
  194. # configuration script generated by Autoconf, you may include it under
  195. # the same distribution terms that you use for the rest of that program.
  196.  
  197. # The name of this program.
  198. progname=`$echo "$0" | sed 's%^.*/%%'`
  199. modename="$progname"
  200.  
  201. # Constants.
  202. PROGRAM=ltmain.sh
  203. PACKAGE=libtool
  204. VERSION=1.2
  205.  
  206. default_mode=
  207. help="Try \`$progname --help' for more information."
  208. magic="%%%MAGIC variable%%%"
  209. mkdir="mkdir"
  210. mv="mv -f"
  211. rm="rm -f"
  212.  
  213. # Sed substitution that helps us do robust quoting.  It backslashifies
  214. # metacharacters that are still active within double-quoted strings.
  215. Xsed='sed -e s/^X//'
  216. sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
  217.  
  218. # NLS nuisances.
  219. # Only set LANG and LC_ALL to C if already set.
  220. # These must not be set unconditionally because not all systems understand
  221. # e.g. LANG=C (notably SCO).
  222. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  223. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  224.  
  225. if test "$LTCONFIG_VERSION" != "$VERSION"; then
  226.   echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
  227.   echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
  228.   exit 1
  229. fi
  230.  
  231. if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
  232.   echo "$modename: not configured to build any kind of library" 1>&2
  233.   echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
  234.   exit 1
  235. fi
  236.  
  237. # Global variables.
  238. mode=$default_mode
  239. nonopt=
  240. prev=
  241. prevopt=
  242. run=
  243. show="$echo"
  244. show_help=
  245. execute_dlfiles=
  246.  
  247. # Parse our command line options once, thoroughly.
  248. while test $# -gt 0
  249. do
  250.   arg="$1"
  251.   shift
  252.  
  253.   case "$arg" in
  254.   -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
  255.   *) optarg= ;;
  256.   esac
  257.  
  258.   # If the previous option needs an argument, assign it.
  259.   if test -n "$prev"; then
  260.     case "$prev" in
  261.     execute_dlfiles)
  262.       eval "$prev=\"\$$prev \$arg\""
  263.       ;;
  264.     *)
  265.       eval "$prev=\$arg"
  266.       ;;
  267.     esac
  268.  
  269.     prev=
  270.     prevopt=
  271.     continue
  272.   fi
  273.  
  274.   # Have we seen a non-optional argument yet?
  275.   case "$arg" in
  276.   --help)
  277.     show_help=yes
  278.     ;;
  279.  
  280.   --version)
  281.     echo "$PROGRAM (GNU $PACKAGE) $VERSION"
  282.     exit 0
  283.     ;;
  284.  
  285.   --dry-run | -n)
  286.     run=:
  287.     ;;
  288.  
  289.   --features)
  290.     echo "host: $host"
  291.     if test "$build_libtool_libs" = yes; then
  292.       echo "enable shared libraries"
  293.     else
  294.       echo "disable shared libraries"
  295.     fi
  296.     if test "$build_old_libs" = yes; then
  297.       echo "enable static libraries"
  298.     else
  299.       echo "disable static libraries"
  300.     fi
  301.     exit 0
  302.     ;;
  303.  
  304.   --finish) mode="finish" ;;
  305.  
  306.   --mode) prevopt="--mode" prev=mode ;;
  307.   --mode=*) mode="$optarg" ;;
  308.  
  309.   --quiet | --silent)
  310.     show=:
  311.     ;;
  312.  
  313.   -dlopen)
  314.     prevopt="-dlopen"
  315.     prev=execute_dlfiles
  316.     ;;
  317.  
  318.   -*)
  319.     $echo "$modename: unrecognized option \`$arg'" 1>&2
  320.     $echo "$help" 1>&2
  321.     exit 1
  322.     ;;
  323.  
  324.   *)
  325.     nonopt="$arg"
  326.     break
  327.     ;;
  328.   esac
  329. done
  330.  
  331. if test -n "$prevopt"; then
  332.   $echo "$modename: option \`$prevopt' requires an argument" 1>&2
  333.   $echo "$help" 1>&2
  334.   exit 1
  335. fi
  336.  
  337. if test -z "$show_help"; then
  338.  
  339.   # Infer the operation mode.
  340.   if test -z "$mode"; then
  341.     case "$nonopt" in
  342.     *cc | *++ | gcc* | *-gcc*)
  343.       mode=link
  344.       for arg
  345.       do
  346.         case "$arg" in
  347.         -c)
  348.            mode=compile
  349.            break
  350.            ;;
  351.         esac
  352.       done
  353.       ;;
  354.     *db | *dbx)
  355.       mode=execute
  356.       ;;
  357.     *install*|cp|mv)
  358.       mode=install
  359.       ;;
  360.     *rm)
  361.       mode=uninstall
  362.       ;;
  363.     *)
  364.       # If we have no mode, but dlfiles were specified, then do execute mode.
  365.       test -n "$execute_dlfiles" && mode=execute
  366.  
  367.       # Just use the default operation mode.
  368.       if test -z "$mode"; then
  369.         if test -n "$nonopt"; then
  370.           $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
  371.         else
  372.           $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
  373.         fi
  374.       fi
  375.       ;;
  376.     esac
  377.   fi
  378.  
  379.   # Only execute mode is allowed to have -dlopen flags.
  380.   if test -n "$execute_dlfiles" && test "$mode" != execute; then
  381.     $echo "$modename: unrecognized option \`-dlopen'" 1>&2
  382.     $echo "$help" 1>&2
  383.     exit 1
  384.   fi
  385.  
  386.   # Change the help message to a mode-specific one.
  387.   generic_help="$help"
  388.   help="Try \`$modename --help --mode=$mode' for more information."
  389.  
  390.   # These modes are in order of execution frequency so that they run quickly.
  391.   case "$mode" in
  392.   # libtool compile mode
  393.   compile)
  394.     modename="$modename: compile"
  395.     # Get the compilation command and the source file.
  396.     base_compile=
  397.     lastarg=
  398.     srcfile="$nonopt"
  399.     suppress_output=
  400.  
  401.     for arg
  402.     do
  403.       # Accept any command-line options.
  404.       case "$arg" in
  405.       -o)
  406.     $echo "$modename: you cannot specify the output filename with \`-o'" 1>&2
  407.     $echo "$help" 1>&2
  408.     exit 1
  409.     ;;
  410.  
  411.       -static)
  412.     build_libtool_libs=no
  413.     build_old_libs=yes
  414.     continue
  415.     ;;
  416.       esac
  417.  
  418.       # Accept the current argument as the source file.
  419.       lastarg="$srcfile"
  420.       srcfile="$arg"
  421.  
  422.       # Aesthetically quote the previous argument.
  423.  
  424.       # Backslashify any backslashes, double quotes, and dollar signs.
  425.       # These are the only characters that are still specially
  426.       # interpreted inside of double-quoted scrings.
  427.       lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
  428.  
  429.       # Double-quote args containing other shell metacharacters.
  430.       # Many Bourne shells cannot handle close brackets correctly in scan
  431.       # sets, so we specify it separately.
  432.       case "$lastarg" in
  433.       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*)
  434.     lastarg="\"$lastarg\""
  435.     ;;
  436.       esac
  437.  
  438.       # Add the previous argument to base_compile.
  439.       if test -z "$base_compile"; then
  440.     base_compile="$lastarg"
  441.       else
  442.     base_compile="$base_compile $lastarg"
  443.       fi
  444.     done
  445.  
  446.     # Get the name of the library object.
  447.     libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
  448.  
  449.     # Recognize several different file suffixes.
  450.     xform='[cCFSfms]'
  451.     case "$libobj" in
  452.     *.ada) xform=ada ;;
  453.     *.adb) xform=adb ;;
  454.     *.ads) xform=ads ;;
  455.     *.asm) xform=asm ;;
  456.     *.c++) xform=c++ ;;
  457.     *.cc) xform=cc ;;
  458.     *.cpp) xform=cpp ;;
  459.     *.cxx) xform=cxx ;;
  460.     *.f90) xform=f90 ;;
  461.     *.for) xform=for ;;
  462.     esac
  463.  
  464.     libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
  465.  
  466.     case "$libobj" in
  467.     *.lo) obj=`$echo "X$libobj" | $Xsed -e 's/\.lo$/.o/'` ;;
  468.     *)
  469.       $echo "$modename: cannot determine name of library object from \`$srcfile'" 1>&2
  470.       exit 1
  471.       ;;
  472.     esac
  473.  
  474.     if test -z "$base_compile"; then
  475.       $echo "$modename: you must specify a compilation command" 1>&2
  476.       $echo "$help" 1>&2
  477.       exit 1
  478.     fi
  479.  
  480.     # Delete any leftover library objects.
  481.     if test "$build_old_libs" = yes; then
  482.       $run $rm $obj $libobj
  483.       trap "$run $rm $obj $libobj; exit 1" 1 2 15
  484.     else
  485.       $run $rm $libobj
  486.       trap "$run $rm $libobj; exit 1" 1 2 15
  487.     fi
  488.  
  489.     # Only build a PIC object if we are building libtool libraries.
  490.     if test "$build_libtool_libs" = yes; then
  491.       # Without this assignment, base_compile gets emptied.
  492.       fbsd_hideous_sh_bug=$base_compile
  493.  
  494.       # All platforms use -DPIC, to notify preprocessed assembler code.
  495.       $show "$base_compile$pic_flag -DPIC $srcfile"
  496.       if $run eval "$base_compile\$pic_flag -DPIC \$srcfile"; then :
  497.       else
  498.         test -n "$obj" && $run $rm $obj
  499.         exit 1
  500.       fi
  501.  
  502.       # If we have no pic_flag, then copy the object into place and finish.
  503.       if test -z "$pic_flag"; then
  504.         $show "$LN_S $obj $libobj"
  505.         $run $LN_S $obj $libobj
  506.         exit $?
  507.       fi
  508.  
  509.       # Just move the object, then go on to compile the next one
  510.       $show "$mv $obj $libobj"
  511.       $run $mv $obj $libobj || exit 1
  512.  
  513.       # Allow error messages only from the first compilation.
  514.       suppress_output=' >/dev/null 2>&1'
  515.     fi
  516.  
  517.     # Only build a position-dependent object if we build old libraries.
  518.     if test "$build_old_libs" = yes; then
  519.       # Suppress compiler output if we already did a PIC compilation.
  520.       $show "$base_compile $srcfile$suppress_output"
  521.       if $run eval "$base_compile \$srcfile$suppress_output"; then :
  522.       else
  523.         $run $rm $obj $libobj
  524.         exit 1
  525.       fi
  526.     fi
  527.  
  528.     # Create an invalid libtool object if no PIC, so that we do not
  529.     # accidentally link it into a program.
  530.     if test "$build_libtool_libs" != yes; then
  531.       $show "echo timestamp > $libobj"
  532.       $run eval "echo timestamp > \$libobj" || exit $?
  533.     fi
  534.  
  535.     exit 0
  536.     ;;
  537.  
  538.   # libtool link mode
  539.   link)
  540.     modename="$modename: link"
  541.     CC="$nonopt"
  542.     allow_undefined=yes
  543.     compile_command="$CC"
  544.     finalize_command="$CC"
  545.  
  546.     compile_shlibpath=
  547.     finalize_shlibpath=
  548.     deplibs=
  549.     dlfiles=
  550.     dlprefiles=
  551.     export_dynamic=no
  552.     hardcode_libdirs=
  553.     libobjs=
  554.     link_against_libtool_libs=
  555.     ltlibs=
  556.     objs=
  557.     olibobjs=
  558.     prev=
  559.     prevarg=
  560.     release=
  561.     rpath=
  562.     perm_rpath=
  563.     temp_rpath=
  564.     vinfo=
  565.  
  566.     # We need to know -static, to get the right output filenames.
  567.     for arg
  568.     do
  569.       case "$arg" in
  570.       -all-static | -static)
  571.         if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
  572.         $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
  573.         fi
  574.         build_libtool_libs=no
  575.     build_old_libs=yes
  576.         break
  577.         ;;
  578.       esac
  579.     done
  580.  
  581.     # See if our shared archives depend on static archives.
  582.     test -n "$old_archive_from_new_cmds" && build_old_libs=yes
  583.  
  584.     # Go through the arguments, transforming them on the way.
  585.     for arg
  586.     do
  587.       # If the previous option needs an argument, assign it.
  588.       if test -n "$prev"; then
  589.         case "$prev" in
  590.         output)
  591.           compile_command="$compile_command @OUTPUT@"
  592.           finalize_command="$finalize_command @OUTPUT@"
  593.           ;;
  594.         esac
  595.  
  596.         case "$prev" in
  597.         dlfiles|dlprefiles)
  598.           case "$arg" in
  599.           *.la | *.lo) ;;  # We handle these cases below.
  600.           *)
  601.             dlprefiles="$dlprefiles $arg"
  602.             test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
  603.             prev=
  604.             ;;
  605.           esac
  606.           ;;
  607.     release)
  608.       release="-$arg"
  609.       prev=
  610.       continue
  611.       ;;
  612.         rpath)
  613.           rpath="$rpath $arg"
  614.       prev=
  615.       continue
  616.       ;;
  617.         *)
  618.           eval "$prev=\"\$arg\""
  619.           prev=
  620.           continue
  621.           ;;
  622.         esac
  623.       fi
  624.  
  625.       prevarg="$arg"
  626.  
  627.       case "$arg" in
  628.       -all-static)
  629.     if test -n "$link_static_flag"; then
  630.           compile_command="$compile_command $link_static_flag"
  631.       finalize_command="$finalize_command $link_static_flag"
  632.         fi
  633.         continue
  634.     ;;
  635.  
  636.       -allow-undefined)
  637.     # FIXME: remove this flag sometime in the future.
  638.     $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
  639.     continue
  640.     ;;
  641.  
  642.       -dlopen)
  643.         prev=dlfiles
  644.         continue
  645.         ;;
  646.  
  647.       -dlpreopen)
  648.         prev=dlprefiles
  649.         continue
  650.         ;;
  651.  
  652.       -export-dynamic)
  653.         if test "$export_dynamic" != yes; then
  654.           export_dynamic=yes
  655.       if test -n "$export_dynamic_flag_spec"; then
  656.         eval arg=\"$export_dynamic_flag_spec\"
  657.       else
  658.         arg=
  659.       fi
  660.  
  661.           # Add the symbol object into the linking commands.
  662.       compile_command="$compile_command @SYMFILE@"
  663.       finalize_command="$finalize_command @SYMFILE@"
  664.         fi
  665.         ;;
  666.  
  667.       -L*)
  668.         dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
  669.         case "$dir" in
  670.         /* | [A-Za-z]:\\*)
  671.       # Add the corresponding hardcode_libdir_flag, if it is not identical.
  672.           ;;
  673.         *)
  674.           $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
  675.           exit 1
  676.           ;;
  677.         esac
  678.         deplibs="$deplibs $arg"
  679.         ;;
  680.  
  681.       -l*) deplibs="$deplibs $arg" ;;
  682.  
  683.       -no-undefined)
  684.     allow_undefined=no
  685.     continue
  686.     ;;
  687.  
  688.       -o) prev=output ;;
  689.  
  690.       -release)
  691.     prev=release
  692.     continue
  693.     ;;
  694.  
  695.       -rpath)
  696.         prev=rpath
  697.         continue
  698.         ;;
  699.  
  700.       -static)
  701.     # If we have no pic_flag, then this is the same as -all-static.
  702.     if test -z "$pic_flag" && test -n "$link_static_flag"; then
  703.           compile_command="$compile_command $link_static_flag"
  704.       finalize_command="$finalize_command $link_static_flag"
  705.         fi
  706.     continue
  707.     ;;
  708.  
  709.       -version-info)
  710.         prev=vinfo
  711.         continue
  712.         ;;
  713.  
  714.       # Some other compiler flag.
  715.       -* | +*)
  716.     # Unknown arguments in both finalize_command and compile_command need
  717.     # to be aesthetically quoted because they are evaled later.
  718.     arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  719.     case "$arg" in
  720.     *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*)
  721.       arg="\"$arg\""
  722.       ;;
  723.     esac
  724.         ;;
  725.  
  726.       *.o | *.a)
  727.         # A standard object.
  728.         objs="$objs $arg"
  729.         ;;
  730.  
  731.       *.lo)
  732.         # A library object.
  733.     if test "$prev" = dlfiles; then
  734.       dlfiles="$dlfiles $arg"
  735.       if test "$build_libtool_libs" = yes; then
  736.         prev=
  737.         continue
  738.       else
  739.         # If libtool objects are unsupported, then we need to preload.
  740.         prev=dlprefiles
  741.       fi
  742.     fi
  743.  
  744.     if test "$prev" = dlprefiles; then
  745.       # Preload the old-style object.
  746.       dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/\.o/'`
  747.       prev=
  748.     fi
  749.     libobjs="$libobjs $arg"
  750.     olibobjs="$olibobjs "`$echo "X$arg" | $Xsed -e 's/\.lo$/\.o/'`
  751.         ;;
  752.  
  753.       *.la)
  754.         # A libtool-controlled library.
  755.  
  756.         dlname=
  757.         libdir=
  758.         library_names=
  759.         old_library=
  760.  
  761.         # Check to see that this really is a libtool archive.
  762.         if (sed -e '2q' $arg | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then :
  763.         else
  764.           $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
  765.           exit 1
  766.         fi
  767.  
  768.         # If there is no directory component, then add one.
  769.         case "$arg" in
  770.         */* | *\\*) . $arg ;;
  771.         *) . ./$arg ;;
  772.         esac
  773.  
  774.         if test -z "$libdir"; then
  775.           $echo "$modename: \`$arg' contains no -rpath information" 1>&2
  776.           exit 1
  777.         fi
  778.  
  779.         # Get the name of the library we link against.
  780.         linklib=
  781.         for l in $old_library $library_names; do
  782.           linklib="$l"
  783.         done
  784.  
  785.         if test -z "$linklib"; then
  786.           $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
  787.           exit 1
  788.         fi
  789.  
  790.         # Find the relevant object directory and library name.
  791.         name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
  792.         dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  793.         if test "X$dir" = "X$arg"; then
  794.           dir="$objdir"
  795.         else
  796.           dir="$dir/$objdir"
  797.         fi
  798.  
  799.         # This library was specified with -dlopen.
  800.         if test "$prev" = dlfiles; then
  801.           dlfiles="$dlfiles $arg"
  802.           if test -z "$dlname"; then
  803.             # If there is no dlname, we need to preload.
  804.             prev=dlprefiles
  805.           else
  806.             # We should not create a dependency on this library, but we
  807.         # may need any libraries it requires.
  808.         compile_command="$compile_command$dependency_libs"
  809.         finalize_command="$finalize_command$dependency_libs"
  810.             prev=
  811.             continue
  812.           fi
  813.         fi
  814.  
  815.         # The library was specified with -dlpreopen.
  816.         if test "$prev" = dlprefiles; then
  817.           # Prefer using a static library (so that no silly _DYNAMIC symbols
  818.           # are required to link).
  819.           if test -n "$old_library"; then
  820.             dlprefiles="$dlprefiles $dir/$old_library"
  821.           else
  822.             dlprefiles="$dlprefiles $dir/$linklib"
  823.           fi
  824.           prev=
  825.         fi
  826.  
  827.         if test "$build_libtool_libs" = yes && test -n "$library_names"; then
  828.           link_against_libtool_libs="$link_against_libtool_libs $arg"
  829.           if test -n "$shlibpath_var"; then
  830.             # Make sure the rpath contains only unique directories.
  831.             case "$temp_rpath " in
  832.             *" $dir "*) ;;
  833.             *) temp_rpath="$temp_rpath $dir" ;;
  834.             esac
  835.           fi
  836.  
  837.       # This is the magic to use -rpath.
  838.           if test -n "$hardcode_libdir_flag_spec"; then
  839.             if test -n "$hardcode_libdir_separator"; then
  840.               if test -z "$hardcode_libdirs"; then
  841.                 # Put the magic libdir with the hardcode flag.
  842.                 hardcode_libdirs="$libdir"
  843.                 libdir="@HARDCODE_LIBDIRS@"
  844.               else
  845.                 # Just accumulate the unique libdirs.
  846.         case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
  847.         *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  848.           ;;
  849.         *)
  850.           hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  851.           ;;
  852.         esac
  853.                 libdir=
  854.               fi
  855.             fi
  856.  
  857.             if test -n "$libdir"; then
  858.               eval flag=\"$hardcode_libdir_flag_spec\"
  859.  
  860.               compile_command="$compile_command $flag"
  861.               finalize_command="$finalize_command $flag"
  862.             fi
  863.           elif test -n "$runpath_var"; then
  864.             # Do the same for the permanent run path.
  865.             case "$perm_rpath " in
  866.             *" $libdir "*) ;;
  867.             *) perm_rpath="$perm_rpath $libdir" ;;
  868.             esac
  869.           fi
  870.  
  871.  
  872.           case "$hardcode_action" in
  873.           immediate)
  874.             if test "$hardcode_direct" = no; then
  875.               compile_command="$compile_command $dir/$linklib"
  876.             elif test "$hardcode_minus_L" = no; then
  877.               compile_command="$compile_command -L$dir -l$name"
  878.             elif test "$hardcode_shlibpath_var" = no; then
  879.               compile_shlibpath="$compile_shlibpath$dir:"
  880.               compile_command="$compile_command -l$name"
  881.             fi
  882.             ;;
  883.  
  884.           relink)
  885.             # We need an absolute path.
  886.             case "$dir" in
  887.             /* | [A-Za-z]:\\*) ;;
  888.             *)
  889.               absdir=`cd "$dir" && pwd`
  890.               if test -z "$absdir"; then
  891.                 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
  892.                 exit 1
  893.               fi
  894.               dir="$absdir"
  895.               ;;
  896.             esac
  897.  
  898.             if test "$hardcode_direct" = yes; then
  899.               compile_command="$compile_command $dir/$linklib"
  900.             elif test "$hardcode_minus_L" = yes; then
  901.               compile_command="$compile_command -L$dir -l$name"
  902.             elif test "$hardcode_shlibpath_var" = yes; then
  903.               compile_shlibpath="$compile_shlibpath$dir:"
  904.               compile_command="$compile_command -l$name"
  905.             fi
  906.             ;;
  907.  
  908.           *)
  909.             $echo "$modename: \`$hardcode_action' is an unknown hardcode action" 1>&2
  910.             exit 1
  911.             ;;
  912.           esac
  913.  
  914.           # Finalize command for both is simple: just hardcode it.
  915.           if test "$hardcode_direct" = yes; then
  916.             finalize_command="$finalize_command $libdir/$linklib"
  917.           elif test "$hardcode_minus_L" = yes; then
  918.             finalize_command="$finalize_command -L$libdir -l$name"
  919.           elif test "$hardcode_shlibpath_var" = yes; then
  920.             finalize_shlibpath="$finalize_shlibpath$libdir:"
  921.             finalize_command="$finalize_command -l$name"
  922.           else
  923.             # We cannot seem to hardcode it, guess we'll fake it.
  924.             finalize_command="$finalize_command -L$libdir -l$name"
  925.           fi
  926.         else
  927.           # Transform directly to old archives if we don't build new libraries.
  928.           if test -n "$pic_flag" && test -z "$old_library"; then
  929.             $echo "$modename: cannot find static library for \`$arg'" 1>&2
  930.             exit 1
  931.           fi
  932.  
  933.       # Here we assume that one of hardcode_direct or hardcode_minus_L
  934.       # is not unsupported.  This is valid on all known static and
  935.       # shared platforms.
  936.       if test "$hardcode_direct" != unsupported; then
  937.         test -n "$old_library" && linklib="$old_library"
  938.         compile_command="$compile_command $dir/$linklib"
  939.         finalize_command="$finalize_command $dir/$linklib"
  940.       else
  941.         compile_command="$compile_command -L$dir -l$name"
  942.         finalize_command="$finalize_command -L$dir -l$name"
  943.       fi
  944.         fi
  945.  
  946.     # Add in any libraries that this one depends upon.
  947.     compile_command="$compile_command$dependency_libs"
  948.     finalize_command="$finalize_command$dependency_libs"
  949.     continue
  950.         ;;
  951.  
  952.       # Some other compiler argument.
  953.       *)
  954.     # Unknown arguments in both finalize_command and compile_command need
  955.     # to be aesthetically quoted because they are evaled later.
  956.     arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  957.     case "$arg" in
  958.     *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*)
  959.       arg="\"$arg\""
  960.       ;;
  961.     esac
  962.         ;;
  963.       esac
  964.  
  965.       # Now actually substitute the argument into the commands.
  966.       if test -n "$arg"; then
  967.     compile_command="$compile_command $arg"
  968.     finalize_command="$finalize_command $arg"
  969.       fi
  970.     done
  971.  
  972.     if test -n "$prev"; then
  973.       $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
  974.       $echo "$help" 1>&2
  975.       exit 1
  976.     fi
  977.  
  978.     if test -n "$vinfo" && test -n "$release"; then
  979.       $echo "$modename: you cannot specify both \`-version-info' and \`-release'" 1>&2
  980.       $echo "$help" 1>&2
  981.       exit 1
  982.     fi
  983.  
  984.     oldlib=
  985.     oldobjs=
  986.     case "$output" in
  987.     "")
  988.       $echo "$modename: you must specify an output file" 1>&2
  989.       $echo "$help" 1>&2
  990.       exit 1
  991.       ;;
  992.  
  993.     */* | *\\*)
  994.       $echo "$modename: output file \`$output' must have no directory components" 1>&2
  995.       exit 1
  996.       ;;
  997.  
  998.     *.a)
  999.       # Now set the variables for building old libraries.
  1000.       build_libtool_libs=no
  1001.       build_old_libs=yes
  1002.       oldlib="$output"
  1003.       $show "$rm $oldlib"
  1004.       $run $rm $oldlib
  1005.       ;;
  1006.  
  1007.     *.la)
  1008.       # Make sure we only generate libraries of the form `libNAME.la'.
  1009.       case "$output" in
  1010.       lib*) ;;
  1011.       *)
  1012.     $echo "$modename: libtool library \`$arg' must begin with \`lib'" 1>&2
  1013.     $echo "$help" 1>&2
  1014.     exit 1
  1015.     ;;
  1016.       esac
  1017.  
  1018.       name=`$echo "X$output" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
  1019.       eval libname=\"$libname_spec\"
  1020.  
  1021.       # All the library-specific variables (install_libdir is set above).
  1022.       library_names=
  1023.       old_library=
  1024.       dlname=
  1025.       current=0
  1026.       revision=0
  1027.       age=0
  1028.  
  1029.       if test -n "$objs"; then
  1030.         $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
  1031.         exit 1
  1032.       fi
  1033.  
  1034.       # How the heck are we supposed to write a wrapper for a shared library?
  1035.       if test -n "$link_against_libtool_libs"; then
  1036.         $echo "$modename: libtool library \`$output' may not depend on uninstalled libraries:$link_against_libtool_libs" 1>&2
  1037.         exit 1
  1038.       fi
  1039.  
  1040.       if test -n "$dlfiles$dlprefiles"; then
  1041.         $echo "$modename: warning: \`-dlopen' is ignored while creating libtool libraries" 1>&2
  1042.         # Nullify the symbol file.
  1043.         compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
  1044.         finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
  1045.       fi
  1046.  
  1047.       if test -z "$rpath"; then
  1048.         $echo "$modename: you must specify an installation directory with \`-rpath'" 1>&2
  1049.     $echo "$help" 1>&2
  1050.         exit 1
  1051.       fi
  1052.  
  1053.       set dummy $rpath
  1054.       if test $# -gt 2; then
  1055.     $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
  1056.       fi
  1057.       install_libdir="$2"
  1058.  
  1059.       # Parse the version information argument.
  1060.       IFS="${IFS=     }"; save_ifs="$IFS"; IFS=':'
  1061.       set dummy $vinfo
  1062.       IFS="$save_ifs"
  1063.  
  1064.       if test -n "$5"; then
  1065.         $echo "$modename: too many parameters to \`-version-info'" 1>&2
  1066.         $echo "$help" 1>&2
  1067.         exit 1
  1068.       fi
  1069.  
  1070.       test -n "$2" && current="$2"
  1071.       test -n "$3" && revision="$3"
  1072.       test -n "$4" && age="$4"
  1073.  
  1074.       # Check that each of the things are valid numbers.
  1075.       case "$current" in
  1076.       0 | [1-9] | [1-9][0-9]*) ;;
  1077.       *)
  1078.         $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
  1079.         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  1080.         exit 1
  1081.         ;;
  1082.       esac
  1083.  
  1084.       case "$revision" in
  1085.       0 | [1-9] | [1-9][0-9]*) ;;
  1086.       *)
  1087.         $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
  1088.         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  1089.         exit 1
  1090.         ;;
  1091.       esac
  1092.  
  1093.       case "$age" in
  1094.       0 | [1-9] | [1-9][0-9]*) ;;
  1095.       *)
  1096.         $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
  1097.         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  1098.         exit 1
  1099.         ;;
  1100.       esac
  1101.  
  1102.       if test $age -gt $current; then
  1103.         $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
  1104.         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  1105.         exit 1
  1106.       fi
  1107.  
  1108.       # Calculate the version variables.
  1109.       version_vars="version_type current age revision"
  1110.       case "$version_type" in
  1111.       none) ;;
  1112.  
  1113.       linux)
  1114.         version_vars="$version_vars major versuffix"
  1115.         major=`expr $current - $age`
  1116.         versuffix="$major.$age.$revision"
  1117.         ;;
  1118.  
  1119.       osf)
  1120.         version_vars="$version_vars versuffix verstring"
  1121.         major=`expr $current - $age`
  1122.         versuffix="$current.$age.$revision"
  1123.         verstring="$versuffix"
  1124.  
  1125.         # Add in all the interfaces that we are compatible with.
  1126.         loop=$age
  1127.         while test $loop != 0; do
  1128.           iface=`expr $current - $loop`
  1129.           loop=`expr $loop - 1`
  1130.           verstring="$verstring:${iface}.0"
  1131.         done
  1132.  
  1133.         # Make executables depend on our current version.
  1134.         verstring="$verstring:${current}.0"
  1135.         ;;
  1136.  
  1137.       sunos)
  1138.         version_vars="$version_vars major versuffix"
  1139.         major="$current"
  1140.         versuffix="$current.$revision"
  1141.         ;;
  1142.  
  1143.       *)
  1144.         $echo "$modename: unknown library version type \`$version_type'" 1>&2
  1145.         echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
  1146.         exit 1
  1147.         ;;
  1148.       esac
  1149.  
  1150.       # Create the output directory, or remove our outputs if we need to.
  1151.       if test -d $objdir; then
  1152.         $show "$rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*"
  1153.         $run $rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*
  1154.       else
  1155.         $show "$mkdir $objdir"
  1156.         $run $mkdir $objdir
  1157.     status=$?
  1158.     if test $status -eq 0 || test -d $objdir; then :
  1159.     else
  1160.       exit $status
  1161.     fi
  1162.       fi
  1163.  
  1164.       # Check to see if the archive will have undefined symbols.
  1165.       if test "$allow_undefined" = yes; then
  1166.         if test "$allow_undefined_flag" = unsupported; then
  1167.           $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
  1168.           build_libtool_libs=no
  1169.       build_old_libs=yes
  1170.         fi
  1171.       else
  1172.         # Don't allow undefined symbols.
  1173.         allow_undefined_flag="$no_undefined_flag"
  1174.       fi
  1175.  
  1176.       # Add libc to deplibs on all systems.
  1177.       dependency_libs="$deplibs"
  1178.       deplibs="$deplibs -lc"
  1179.  
  1180.       if test "$build_libtool_libs" = yes; then
  1181.         # Get the real and link names of the library.
  1182.         eval library_names=\"$library_names_spec\"
  1183.         set dummy $library_names
  1184.         realname="$2"
  1185.         shift; shift
  1186.  
  1187.         if test -n "$soname_spec"; then
  1188.           eval soname=\"$soname_spec\"
  1189.         else
  1190.           soname="$realname"
  1191.         fi
  1192.  
  1193.         lib="$objdir/$realname"
  1194.     for link
  1195.     do
  1196.       linknames="$linknames $link"
  1197.     done
  1198.  
  1199.         # Use standard objects if they are PIC.
  1200.         test -z "$pic_flag" && libobjs="$olibobjs"
  1201.  
  1202.         # Do each of the archive commands.
  1203.         eval cmds=\"$archive_cmds\"
  1204.         IFS="${IFS=     }"; save_ifs="$IFS"; IFS=';'
  1205.         for cmd in $cmds; do
  1206.           IFS="$save_ifs"
  1207.           $show "$cmd"
  1208.           $run eval "$cmd" || exit $?
  1209.         done
  1210.         IFS="$save_ifs"
  1211.  
  1212.         # Create links to the real library.
  1213.         for linkname in $linknames; do
  1214.           $show "(cd $objdir && $LN_S $realname $linkname)"
  1215.           $run eval '(cd $objdir && $LN_S $realname $linkname)' || exit $?
  1216.         done
  1217.  
  1218.         # If -export-dynamic was specified, set the dlname.
  1219.         if test "$export_dynamic" = yes; then
  1220.           # On all known operating systems, these are identical.
  1221.           dlname="$soname"
  1222.         fi
  1223.       fi
  1224.  
  1225.       # Now set the variables for building old libraries.
  1226.       oldlib="$objdir/$libname.a"
  1227.       ;;
  1228.  
  1229.     *.lo | *.o)
  1230.       if test -n "$link_against_libtool_libs"; then
  1231.         $echo "$modename: error: cannot link libtool libraries into reloadable objects" 1>&2
  1232.         exit 1
  1233.       fi
  1234.  
  1235.       if test -n "$deplibs"; then
  1236.         $echo "$modename: warning: \`-l' and \`-L' are ignored while creating objects" 1>&2
  1237.       fi
  1238.  
  1239.       if test -n "$dlfiles$dlprefiles"; then
  1240.         $echo "$modename: warning: \`-dlopen' is ignored while creating objects" 1>&2
  1241.         # Nullify the symbol file.
  1242.         compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
  1243.         finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
  1244.       fi
  1245.  
  1246.       if test -n "$rpath"; then
  1247.         $echo "$modename: warning: \`-rpath' is ignored while creating objects" 1>&2
  1248.       fi
  1249.  
  1250.       if test -n "$vinfo"; then
  1251.         $echo "$modename: warning: \`-version-info' is ignored while creating objects" 1>&2
  1252.       fi
  1253.  
  1254.       if test -n "$release"; then
  1255.         $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2
  1256.       fi
  1257.  
  1258.       case "$output" in
  1259.       *.lo)
  1260.         if test -n "$objs"; then
  1261.           $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
  1262.           exit 1
  1263.         fi
  1264.         libobj="$output"
  1265.         obj=`$echo "X$output" | $Xsed -e 's/\.lo$/.o/'`
  1266.         ;;
  1267.       *)
  1268.         libobj=
  1269.         obj="$output"
  1270.         ;;
  1271.       esac
  1272.  
  1273.       # Delete the old objects.
  1274.       $run $rm $obj $libobj
  1275.  
  1276.       # Create the old-style object.
  1277.       reload_objs="$objs $olibobjs"
  1278.  
  1279.       output="$obj"
  1280.       eval cmds=\"$reload_cmds\"
  1281.       IFS="${IFS=     }"; save_ifs="$IFS"; IFS=';'
  1282.       for cmd in $cmds; do
  1283.         IFS="$save_ifs"
  1284.         $show "$cmd"
  1285.         $run eval "$cmd" || exit $?
  1286.       done
  1287.       IFS="$save_ifs"
  1288.  
  1289.       # Exit if we aren't doing a library object file.
  1290.       test -z "$libobj" && exit 0
  1291.  
  1292.       if test "$build_libtool_libs" != yes; then
  1293.         # Create an invalid libtool object if no PIC, so that we don't
  1294.         # accidentally link it into a program.
  1295.         $show "echo timestamp > $libobj"
  1296.         $run eval "echo timestamp > $libobj" || exit $?
  1297.         exit 0
  1298.       fi
  1299.  
  1300.       if test -n "$pic_flag"; then
  1301.         # Only do commands if we really have different PIC objects.
  1302.         reload_objs="$libobjs"
  1303.         output="$libobj"
  1304.         eval cmds=\"$reload_cmds\"
  1305.         IFS="${IFS=     }"; save_ifs="$IFS"; IFS=';'
  1306.         for cmd in $cmds; do
  1307.           IFS="$save_ifs"
  1308.           $show "$cmd"
  1309.           $run eval "$cmd" || exit $?
  1310.         done
  1311.         IFS="$save_ifs"
  1312.       else
  1313.         # Just create a symlink.
  1314.         $show "$LN_S $obj $libobj"
  1315.         $run $LN_S $obj $libobj || exit 1
  1316.       fi
  1317.  
  1318.       exit 0
  1319.       ;;
  1320.  
  1321.     *)
  1322.       if test -n "$vinfo"; then
  1323.         $echo "$modename: warning: \`-version-info' is ignored while linking programs" 1>&2
  1324.       fi
  1325.  
  1326.       if test -n "$release"; then
  1327.         $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2
  1328.       fi
  1329.  
  1330.       if test -n "$rpath"; then
  1331.     # If the user specified any rpath flags, then add them.
  1332.     for libdir in $rpath; do
  1333.           if test -n "$hardcode_libdir_flag_spec"; then
  1334.             if test -n "$hardcode_libdir_separator"; then
  1335.               if test -z "$hardcode_libdirs"; then
  1336.                 # Put the magic libdir with the hardcode flag.
  1337.                 hardcode_libdirs="$libdir"
  1338.                 libdir="@HARDCODE_LIBDIRS@"
  1339.               else
  1340.                 # Just accumulate the unique libdirs.
  1341.         case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
  1342.         *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  1343.           ;;
  1344.         *)
  1345.           hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  1346.           ;;
  1347.         esac
  1348.                 libdir=
  1349.               fi
  1350.             fi
  1351.  
  1352.             if test -n "$libdir"; then
  1353.               eval flag=\"$hardcode_libdir_flag_spec\"
  1354.  
  1355.               compile_command="$compile_command $flag"
  1356.               finalize_command="$finalize_command $flag"
  1357.             fi
  1358.           elif test -n "$runpath_var"; then
  1359.             case "$perm_rpath " in
  1360.             *" $libdir "*) ;;
  1361.             *) perm_rpath="$perm_rpath $libdir" ;;
  1362.             esac
  1363.           fi
  1364.     done
  1365.       fi
  1366.  
  1367.       # Substitute the hardcoded libdirs into the compile commands.
  1368.       if test -n "$hardcode_libdir_separator"; then
  1369.     compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
  1370.     finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
  1371.       fi
  1372.  
  1373.       if test -n "$libobjs" && test "$build_old_libs" = yes; then
  1374.         # Transform all the library objects into standard objects.
  1375.         compile_command=`$echo "X$compile_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
  1376.         finalize_command=`$echo "X$finalize_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
  1377.       fi
  1378.  
  1379.       if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then
  1380.         dlsyms="${output}S.c"
  1381.       else
  1382.         dlsyms=
  1383.       fi
  1384.  
  1385.       if test -n "$dlsyms"; then
  1386.         # Add our own program objects to the preloaded list.
  1387.         dlprefiles=`$echo "X$objs$dlprefiles " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
  1388.  
  1389.     # Discover the nlist of each of the dlfiles.
  1390.         nlist="$objdir/${output}.nm"
  1391.  
  1392.     if test -d $objdir; then
  1393.       $show "$rm $nlist ${nlist}T"
  1394.       $run $rm "$nlist" "${nlist}T"
  1395.     else
  1396.       $show "$mkdir $objdir"
  1397.       $run $mkdir $objdir
  1398.       status=$?
  1399.       if test $status -eq 0 || test -d $objdir; then :
  1400.       else
  1401.         exit $status
  1402.       fi
  1403.     fi
  1404.  
  1405.         for arg in $dlprefiles; do
  1406.       $show "extracting global C symbols from \`$arg'"
  1407.       $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
  1408.         done
  1409.  
  1410.         # Parse the name list into a source file.
  1411.         $show "creating $objdir/$dlsyms"
  1412.         if test -z "$run"; then
  1413.       # Make sure we at least have an empty file.
  1414.       test -f "$nlist" || : > "$nlist"
  1415.  
  1416.       # Try sorting and uniquifying the output.
  1417.       if sort "$nlist" | uniq > "$nlist"T; then
  1418.         mv -f "$nlist"T "$nlist"
  1419.         wcout=`wc "$nlist" 2>/dev/null`
  1420.         count=`echo "X$wcout" | $Xsed -e 's/^[     ]*\([0-9][0-9]*\).*$/\1/'`
  1421.         (test "$count" -ge 0) 2>/dev/null || count=-1
  1422.       else
  1423.         $rm "$nlist"T
  1424.         count=-1
  1425.       fi
  1426.  
  1427.       case "$dlsyms" in
  1428.       "") ;;
  1429.       *.c)
  1430.         $echo > "$objdir/$dlsyms" "\
  1431. /* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */
  1432. /* Generated by $PROGRAM - GNU $PACKAGE $VERSION */
  1433.  
  1434. #ifdef __cplusplus
  1435. extern \"C\" {
  1436. #endif
  1437.  
  1438. /* Prevent the only kind of declaration conflicts we can make. */
  1439. #define dld_preloaded_symbol_count some_other_symbol
  1440. #define dld_preloaded_symbols some_other_symbol
  1441.  
  1442. /* External symbol declarations for the compiler. */\
  1443. "
  1444.  
  1445.         if test -f "$nlist"; then
  1446.           sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms"
  1447.         else
  1448.           echo '/* NONE */' >> "$objdir/$dlsyms"
  1449.         fi
  1450.  
  1451.         $echo >> "$objdir/$dlsyms" "\
  1452.  
  1453. #undef dld_preloaded_symbol_count
  1454. #undef dld_preloaded_symbols
  1455.  
  1456. #if defined (__STDC__) && __STDC__
  1457. # define __ptr_t void *
  1458. #else
  1459. # define __ptr_t char *
  1460. #endif
  1461.  
  1462. /* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
  1463. int dld_preloaded_symbol_count = $count;
  1464.  
  1465. /* The mapping between symbol names and symbols. */
  1466. struct {
  1467.   char *name;
  1468.   __ptr_t address;
  1469. }
  1470. dld_preloaded_symbols[] =
  1471. {\
  1472. "
  1473.  
  1474.         if test -f "$nlist"; then
  1475.           sed 's/^\(.*\) \(.*\)$/  {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$objdir/$dlsyms"
  1476.         fi
  1477.  
  1478.         $echo >> "$objdir/$dlsyms" "\
  1479.   {0, (__ptr_t) 0}
  1480. };
  1481.  
  1482. #ifdef __cplusplus
  1483. }
  1484. #endif\
  1485. "
  1486.         ;;
  1487.  
  1488.       *)
  1489.         $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
  1490.         exit 1
  1491.         ;;
  1492.       esac
  1493.         fi
  1494.  
  1495.         # Now compile the dynamic symbol file.
  1496.         $show "(cd $objdir && $CC -c$no_builtin_flag \"$dlsyms\")"
  1497.         $run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $?
  1498.  
  1499.         # Transform the symbol file into the correct name.
  1500.         compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"`
  1501.         finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"`
  1502.       elif test "$export_dynamic" != yes; then
  1503.         test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2
  1504.       else
  1505.         # We keep going just in case the user didn't refer to
  1506.         # dld_preloaded_symbols.  The linker will fail if global_symbol_pipe
  1507.         # really was required.
  1508.         $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
  1509.  
  1510.         # Nullify the symbol file.
  1511.         compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
  1512.         finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
  1513.       fi
  1514.  
  1515.       if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
  1516.         # Replace the output file specification.
  1517.         compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
  1518.         finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
  1519.  
  1520.         # We have no uninstalled library dependencies, so finalize right now.
  1521.         $show "$compile_command"
  1522.         $run eval "$compile_command"
  1523.         exit $?
  1524.       fi
  1525.  
  1526.       # Replace the output file specification.
  1527.       compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'%g'`
  1528.       finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'T%g'`
  1529.  
  1530.       # Create the binary in the object directory, then wrap it.
  1531.       if test -d $objdir; then :
  1532.       else
  1533.         $show "$mkdir $objdir"
  1534.     $run $mkdir $objdir
  1535.     status=$?
  1536.     if test $status -eq 0 || test -d $objdir; then :
  1537.     else
  1538.       exit $status
  1539.     fi
  1540.       fi
  1541.  
  1542.       if test -n "$shlibpath_var"; then
  1543.         # We should set the shlibpath_var
  1544.         rpath=
  1545.         for dir in $temp_rpath; do
  1546.           case "$dir" in
  1547.           /* | [A-Za-z]:\\*)
  1548.             # Absolute path.
  1549.             rpath="$rpath$dir:"
  1550.             ;;
  1551.           *)
  1552.             # Relative path: add a thisdir entry.
  1553.             rpath="$rpath\$thisdir/$dir:"
  1554.             ;;
  1555.           esac
  1556.         done
  1557.         temp_rpath="$rpath"
  1558.       fi
  1559.  
  1560.       # Delete the old output file.
  1561.       $run $rm $output
  1562.  
  1563.       if test -n "$compile_shlibpath"; then
  1564.         compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command"
  1565.       fi
  1566.       if test -n "$finalize_shlibpath"; then
  1567.         finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
  1568.       fi
  1569.  
  1570.       if test -n "$runpath_var" && test -n "$perm_rpath"; then
  1571.         # We should set the runpath_var.
  1572.         rpath=
  1573.         for dir in $perm_rpath; do
  1574.           rpath="$rpath$dir:"
  1575.         done
  1576.         compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command"
  1577.         finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command"
  1578.       fi
  1579.  
  1580.       case "$hardcode_action" in
  1581.       relink)
  1582.         # AGH! Flame the AIX and HP-UX people for me, will ya?
  1583.         $echo "$modename: warning: using a buggy system linker" 1>&2
  1584.         $echo "$modename: relinking will be required before \`$output' can be installed" 1>&2
  1585.         ;;
  1586.       esac
  1587.  
  1588.       $show "$compile_command"
  1589.       $run eval "$compile_command" || exit $?
  1590.  
  1591.       # Now create the wrapper script.
  1592.       $show "creating $output"
  1593.  
  1594.       # Quote the finalize command for shipping.
  1595.       finalize_command=`$echo "X$finalize_command" | $Xsed -e "$sed_quote_subst"`
  1596.  
  1597.       # Quote $echo for shipping.
  1598.       qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
  1599.  
  1600.       # Only actually do things if our run command is non-null.
  1601.       if test -z "$run"; then
  1602.         $rm $output
  1603.         trap "$rm $output; exit 1" 1 2 15
  1604.  
  1605.         $echo > $output "\
  1606. #! /bin/sh
  1607.  
  1608. # $output - temporary wrapper script for $objdir/$output
  1609. # Generated by ltmain.sh - GNU $PACKAGE $VERSION
  1610. #
  1611. # The $output program cannot be directly executed until all the libtool
  1612. # libraries that it depends on are installed.
  1613. #
  1614. # This wrapper script should never be moved out of \``pwd`'.
  1615. # If it is, it will not operate correctly.
  1616.  
  1617. # Sed substitution that helps us do robust quoting.  It backslashifies
  1618. # metacharacters that are still active within double-quoted strings.
  1619. Xsed='sed -e s/^X//'
  1620. sed_quote_subst='$sed_quote_subst'
  1621.  
  1622. # The HP-UX ksh and POSIX shell print the target directory to stdout
  1623. # if CDPATH is set.
  1624. if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi
  1625.  
  1626. # This environment variable determines our operation mode.
  1627. if test \"\$libtool_install_magic\" = \"$magic\"; then
  1628.   # install mode needs the following variables:
  1629.   link_against_libtool_libs='$link_against_libtool_libs'
  1630.   finalize_command=\"$finalize_command\"
  1631. else
  1632.   # When we are sourced in execute mode, \$file and \$echo are already set.
  1633.   if test \"\$libtool_execute_magic\" = \"$magic\"; then :
  1634.   else
  1635.     echo=\"$qecho\"
  1636.     file=\"\$0\"
  1637.   fi\
  1638. "
  1639.         $echo >> $output "\
  1640.  
  1641.   # Find the directory that this script lives in.
  1642.   thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
  1643.   test \"x\$thisdir\" = \"x\$file\" && thisdir=.
  1644.  
  1645.   # Follow symbolic links until we get to the real thisdir.
  1646.   file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
  1647.   while test -n \"\$file\"; do
  1648.     destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
  1649.  
  1650.     # If there was a directory component, then change thisdir.
  1651.     if test \"x\$destdir\" != \"x\$file\"; then
  1652.       case \"\$destdir\" in
  1653.       /* | [A-Za-z]:\\*) thisdir=\"\$destdir\" ;;
  1654.       *) thisdir=\"\$thisdir/\$destdir\" ;;
  1655.       esac
  1656.     fi
  1657.  
  1658.     file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
  1659.     file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
  1660.   done
  1661.  
  1662.   # Try to get the absolute directory name.
  1663.   absdir=\`cd \"\$thisdir\" && pwd\`
  1664.   test -n \"\$absdir\" && thisdir=\"\$absdir\"
  1665.  
  1666.   progdir=\"\$thisdir/$objdir\"
  1667.   program='$output'
  1668.  
  1669.   if test -f \"\$progdir/\$program\"; then"
  1670.  
  1671.         # Export our shlibpath_var if we have one.
  1672.         if test -n "$shlibpath_var" && test -n "$temp_rpath"; then
  1673.           $echo >> $output "\
  1674.     # Add our own library path to $shlibpath_var
  1675.     $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
  1676.  
  1677.     # Some systems cannot cope with colon-terminated $shlibpath_var
  1678.     $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/:*\$//'\`
  1679.  
  1680.     export $shlibpath_var
  1681. "
  1682.         fi
  1683.  
  1684.         $echo >> $output "\
  1685.     if test \"\$libtool_execute_magic\" != \"$magic\"; then
  1686.       # Run the actual program with our arguments.
  1687.  
  1688.       # Export the path to the program.
  1689.       PATH=\"\$progdir:\$PATH\"
  1690.       export PATH
  1691.  
  1692.       exec \$program \${1+\"\$@\"}
  1693.  
  1694.       \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
  1695.       exit 1
  1696.     fi
  1697.   else
  1698.     # The program doesn't exist.
  1699.     \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
  1700.     \$echo \"This script is just a wrapper for \$program.\" 1>&2
  1701.     echo \"See the $PACKAGE documentation for more information.\" 1>&2
  1702.     exit 1
  1703.   fi
  1704. fi\
  1705. "
  1706.         chmod +x $output
  1707.       fi
  1708.       exit 0
  1709.       ;;
  1710.     esac
  1711.  
  1712.     # See if we need to build an old-fashioned archive.
  1713.     if test "$build_old_libs" = "yes"; then
  1714.       # Transform .lo files to .o files.
  1715.       oldobjs="$objs $olibobjs"
  1716.  
  1717.       # Do each command in the archive commands.
  1718.       if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
  1719.     eval cmds=\"$old_archive_from_new_cmds\"
  1720.       else
  1721.     eval cmds=\"$old_archive_cmds\"
  1722.       fi
  1723.       IFS="${IFS=     }"; save_ifs="$IFS"; IFS=';'
  1724.       for cmd in $cmds; do
  1725.         IFS="$save_ifs"
  1726.         $show "$cmd"
  1727.         $run eval "$cmd" || exit $?
  1728.       done
  1729.       IFS="$save_ifs"
  1730.     fi
  1731.  
  1732.     # Now create the libtool archive.
  1733.     case "$output" in
  1734.     *.la)
  1735.       old_library=
  1736.       test "$build_old_libs" = yes && old_library="$libname.a"
  1737.  
  1738.       $show "creating $output"
  1739.  
  1740.       # Only create the output if not a dry run.
  1741.       if test -z "$run"; then
  1742.         $echo > $output "\
  1743. # $output - a libtool library file
  1744. # Generated by ltmain.sh - GNU $PACKAGE $VERSION
  1745.  
  1746. # The name that we can dlopen(3).
  1747. dlname='$dlname'
  1748.  
  1749. # Names of this library.
  1750. library_names='$library_names'
  1751.  
  1752. # The name of the static archive.
  1753. old_library='$old_library'
  1754.  
  1755. # Libraries that this one depends upon.
  1756. dependency_libs='$dependency_libs'
  1757.  
  1758. # Version information for $libname.
  1759. current=$current
  1760. age=$age
  1761. revision=$revision
  1762.  
  1763. # Directory that this library needs to be installed in:
  1764. libdir='$install_libdir'\
  1765. "
  1766.       fi
  1767.  
  1768.       # Do a symbolic link so that the libtool archive can be found in
  1769.       # LD_LIBRARY_PATH before the program is installed.
  1770.       $show "(cd $objdir && $LN_S ../$output $output)"
  1771.       $run eval "(cd $objdir && $LN_S ../$output $output)" || exit 1
  1772.       ;;
  1773.     esac
  1774.     exit 0
  1775.     ;;
  1776.  
  1777.   # libtool install mode
  1778.   install)
  1779.     modename="$modename: install"
  1780.  
  1781.     # There may be an optional /bin/sh argument at the beginning of
  1782.     # install_prog (especially on Windows NT).
  1783.     if test "$nonopt" = "$SHELL"; then
  1784.       # Aesthetically quote it.
  1785.       arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
  1786.       case "$arg" in
  1787.       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*)
  1788.     arg="\"$arg\""
  1789.     ;;
  1790.       esac
  1791.       install_prog="$arg "
  1792.       arg="$1"
  1793.       shift
  1794.     else
  1795.       install_prog=
  1796.       arg="$nonopt"
  1797.     fi
  1798.  
  1799.     # The real first argument should be the name of the installation program.
  1800.     # Aesthetically quote it.
  1801.     arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1802.     case "$arg" in
  1803.     *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*)
  1804.       arg="\"$arg\""
  1805.       ;;
  1806.     esac
  1807.     install_prog="$install_prog$arg"
  1808.  
  1809.     # We need to accept at least all the BSD install flags.
  1810.     dest=
  1811.     files=
  1812.     opts=
  1813.     prev=
  1814.     install_type=
  1815.     isdir=
  1816.     stripme=
  1817.     for arg
  1818.     do
  1819.       if test -n "$dest"; then
  1820.         files="$files $dest"
  1821.         dest="$arg"
  1822.         continue
  1823.       fi
  1824.  
  1825.       case "$arg" in
  1826.       -d) isdir=yes ;;
  1827.       -f) prev="-f" ;;
  1828.       -g) prev="-g" ;;
  1829.       -m) prev="-m" ;;
  1830.       -o) prev="-o" ;;
  1831.       -s)
  1832.         stripme=" -s"
  1833.         continue
  1834.         ;;
  1835.       -*) ;;
  1836.  
  1837.       *)
  1838.         # If the previous option needed an argument, then skip it.
  1839.         if test -n "$prev"; then
  1840.           prev=
  1841.         else
  1842.           dest="$arg"
  1843.           continue
  1844.         fi
  1845.         ;;
  1846.       esac
  1847.  
  1848.       # Aesthetically quote the argument.
  1849.       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1850.       case "$arg" in
  1851.       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*)
  1852.     arg="\"$arg\""
  1853.     ;;
  1854.       esac
  1855.       install_prog="$install_prog $arg"
  1856.     done
  1857.  
  1858.     if test -z "$install_prog"; then
  1859.       $echo "$modename: you must specify an install program" 1>&2
  1860.       $echo "$help" 1>&2
  1861.       exit 1
  1862.     fi
  1863.  
  1864.     if test -n "$prev"; then
  1865.       $echo "$modename: the \`$prev' option requires an argument" 1>&2
  1866.       $echo "$help" 1>&2
  1867.       exit 1
  1868.     fi
  1869.  
  1870.     if test -z "$files"; then
  1871.       if test -z "$dest"; then
  1872.         $echo "$modename: no file or destination specified" 1>&2
  1873.       else
  1874.         $echo "$modename: you must specify a destination" 1>&2
  1875.       fi
  1876.       $echo "$help" 1>&2
  1877.       exit 1
  1878.     fi
  1879.  
  1880.     # Strip any trailing slash from the destination.
  1881.     dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
  1882.  
  1883.     # Check to see that the destination is a directory.
  1884.     test -d "$dest" && isdir=yes
  1885.     if test -n "$isdir"; then
  1886.       destdir="$dest"
  1887.       destname=
  1888.     else
  1889.       destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
  1890.       test "X$destdir" = "X$dest" && destdir=.
  1891.       destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
  1892.  
  1893.       # Not a directory, so check to see that there is only one file specified.
  1894.       set dummy $files
  1895.       if test $# -gt 2; then
  1896.         $echo "$modename: \`$dest' is not a directory" 1>&2
  1897.         $echo "$help" 1>&2
  1898.         exit 1
  1899.       fi
  1900.     fi
  1901.     case "$destdir" in
  1902.     /* | [A-Za-z]:\\*) ;;
  1903.     *)
  1904.       for file in $files; do
  1905.         case "$file" in
  1906.         *.lo) ;;
  1907.         *)
  1908.           $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
  1909.           $echo "$help" 1>&2
  1910.           exit 1
  1911.           ;;
  1912.         esac
  1913.       done
  1914.       ;;
  1915.     esac
  1916.  
  1917.     # This variable tells wrapper scripts just to set variables rather
  1918.     # than running their programs.
  1919.     libtool_install_magic="$magic"
  1920.  
  1921.     staticlibs=
  1922.     future_libdirs=
  1923.     current_libdirs=
  1924.     for file in $files; do
  1925.  
  1926.       # Do each installation.
  1927.       case "$file" in
  1928.       *.a)
  1929.         # Do the static libraries later.
  1930.         staticlibs="$staticlibs $file"
  1931.         ;;
  1932.  
  1933.       *.la)
  1934.         # Check to see that this really is a libtool archive.
  1935.         if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then :
  1936.         else
  1937.           $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
  1938.           $echo "$help" 1>&2
  1939.           exit 1
  1940.         fi
  1941.  
  1942.         library_names=
  1943.         old_library=
  1944.         # If there is no directory component, then add one.
  1945.         case "$file" in
  1946.         */* | *\\*) . $file ;;
  1947.         *) . ./$file ;;
  1948.         esac
  1949.  
  1950.         # Add the libdir to current_libdirs if it is the destination.
  1951.         if test "X$destdir" = "X$libdir"; then
  1952.           case "$current_libdirs " in
  1953.           *" $libdir "*) ;;
  1954.           *) current_libdirs="$current_libdirs $libdir" ;;
  1955.           esac
  1956.         else
  1957.           # Note the libdir as a future libdir.
  1958.           case "$future_libdirs " in
  1959.           *" $libdir "*) ;;
  1960.           *) future_libdirs="$future_libdirs $libdir" ;;
  1961.           esac
  1962.         fi
  1963.  
  1964.         dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
  1965.         test "X$dir" = "X$file/" && dir=
  1966.         dir="$dir$objdir"
  1967.  
  1968.         # See the names of the shared library.
  1969.         set dummy $library_names
  1970.         if test -n "$2"; then
  1971.           realname="$2"
  1972.           shift
  1973.           shift
  1974.  
  1975.           # Install the shared library and build the symlinks.
  1976.           $show "$install_prog $dir/$realname $destdir/$realname"
  1977.           $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
  1978.           test "X$dlname" = "X$realname" && dlname=
  1979.  
  1980.           if test $# -gt 0; then
  1981.             # Delete the old symlinks.
  1982.             rmcmd="$rm"
  1983.             for linkname
  1984.             do
  1985.               rmcmd="$rmcmd $destdir/$linkname"
  1986.             done
  1987.             $show "$rmcmd"
  1988.             $run $rmcmd
  1989.  
  1990.             # ... and create new ones.
  1991.             for linkname
  1992.             do
  1993.               test "X$dlname" = "X$linkname" && dlname=
  1994.               $show "(cd $destdir && $LN_S $realname $linkname)"
  1995.               $run eval "(cd $destdir && $LN_S $realname $linkname)"
  1996.             done
  1997.           fi
  1998.  
  1999.           if test -n "$dlname"; then
  2000.             # Install the dynamically-loadable library.
  2001.             $show "$install_prog $dir/$dlname $destdir/$dlname"
  2002.             $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
  2003.           fi
  2004.  
  2005.           # Do each command in the postinstall commands.
  2006.           lib="$destdir/$realname"
  2007.           eval cmds=\"$postinstall_cmds\"
  2008.           IFS="${IFS=     }"; save_ifs="$IFS"; IFS=';'
  2009.           for cmd in $cmds; do
  2010.             IFS="$save_ifs"
  2011.             $show "$cmd"
  2012.             $run eval "$cmd" || exit $?
  2013.           done
  2014.           IFS="$save_ifs"
  2015.         fi
  2016.  
  2017.         # Install the pseudo-library for information purposes.
  2018.         name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  2019.         $show "$install_prog $file $destdir/$name"
  2020.         $run eval "$install_prog $file $destdir/$name" || exit $?
  2021.  
  2022.         # Maybe install the static library, too.
  2023.         test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
  2024.         ;;
  2025.  
  2026.       *.lo)
  2027.         # Install (i.e. copy) a libtool object.
  2028.  
  2029.         # Figure out destination file name, if it wasn't already specified.
  2030.         if test -n "$destname"; then
  2031.           destfile="$destdir/$destname"
  2032.         else
  2033.           destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  2034.           destfile="$destdir/$destfile"
  2035.         fi
  2036.  
  2037.         # Deduce the name of the destination old-style object file.
  2038.         case "$destfile" in
  2039.         *.lo)
  2040.           staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/\.o/'`
  2041.           ;;
  2042.         *.o)
  2043.           staticdest="$destfile"
  2044.           destfile=
  2045.           ;;
  2046.         *)
  2047.           $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
  2048.           $echo "$help" 1>&2
  2049.           exit 1
  2050.           ;;
  2051.         esac
  2052.  
  2053.         # Install the libtool object if requested.
  2054.         if test -n "$destfile"; then
  2055.           $show "$install_prog $file $destfile"
  2056.           $run eval "$install_prog $file $destfile" || exit $?
  2057.         fi
  2058.  
  2059.         # Install the old object if enabled.
  2060.         if test "$build_old_libs" = yes; then
  2061.           # Deduce the name of the old-style object file.
  2062.           staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/\.o/'`
  2063.  
  2064.           $show "$install_prog $staticobj $staticdest"
  2065.           $run eval "$install_prog \$staticobj \$staticdest" || exit $?
  2066.         fi
  2067.         exit 0
  2068.         ;;
  2069.  
  2070.       *)
  2071.         # Do a test to see if this is really a libtool program.
  2072.         if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then
  2073.           link_against_libtool_libs=
  2074.           finalize_command=
  2075.  
  2076.           # If there is no directory component, then add one.
  2077.           case "$file" in
  2078.           */* | *\\*) . $file ;;
  2079.           *) . ./$file ;;
  2080.           esac
  2081.  
  2082.           # Check the variables that should have been set.
  2083.           if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then
  2084.             $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
  2085.             exit 1
  2086.           fi
  2087.  
  2088.           finalize=yes
  2089.           for lib in $link_against_libtool_libs; do
  2090.             # Check to see that each library is installed.
  2091.             libdir=
  2092.             if test -f "$lib"; then
  2093.               # If there is no directory component, then add one.
  2094.               case "$lib" in
  2095.               */* | *\\*) . $lib ;;
  2096.               *) . ./$lib ;;
  2097.               esac
  2098.             fi
  2099.             libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
  2100.             if test -z "$libdir"; then
  2101.               $echo "$modename: warning: \`$lib' contains no -rpath information" 1>&2
  2102.             elif test -f "$libfile"; then :
  2103.             else
  2104.               $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
  2105.               finalize=no
  2106.             fi
  2107.           done
  2108.  
  2109.           if test "$hardcode_action" = relink; then
  2110.             if test "$finalize" = yes; then
  2111.               $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
  2112.               $show "$finalize_command"
  2113.               if $run eval "$finalize_command"; then :
  2114.               else
  2115.                 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
  2116.                 continue
  2117.               fi
  2118.               file="$objdir/$file"T
  2119.             else
  2120.               $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
  2121.             fi
  2122.           else
  2123.             # Install the binary that we compiled earlier.
  2124.         file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
  2125.           fi
  2126.         fi
  2127.  
  2128.         $show "$install_prog$stripme $file $dest"
  2129.         $run eval "$install_prog\$stripme \$file \$dest" || exit $?
  2130.         ;;
  2131.       esac
  2132.     done
  2133.  
  2134.     for file in $staticlibs; do
  2135.       name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  2136.  
  2137.       # Set up the ranlib parameters.
  2138.       oldlib="$destdir/$name"
  2139.  
  2140.       $show "$install_prog $file $oldlib"
  2141.       $run eval "$install_prog \$file \$oldlib" || exit $?
  2142.  
  2143.       # Do each command in the postinstall commands.
  2144.       eval cmds=\"$old_postinstall_cmds\"
  2145.       IFS="${IFS=     }"; save_ifs="$IFS"; IFS=';'
  2146.       for cmd in $cmds; do
  2147.         IFS="$save_ifs"
  2148.         $show "$cmd"
  2149.         $run eval "$cmd" || exit $?
  2150.       done
  2151.       IFS="$save_ifs"
  2152.     done
  2153.  
  2154.     if test -n "$future_libdirs"; then
  2155.       $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
  2156.     fi
  2157.  
  2158.     if test -n "$current_libdirs"; then
  2159.       # Maybe just do a dry run.
  2160.       test -n "$run" && current_libdirs=" -n$current_libdirs"
  2161.       exec $SHELL $0 --finish$current_libdirs
  2162.       exit 1
  2163.     fi
  2164.  
  2165.     exit 0
  2166.     ;;
  2167.  
  2168.   # libtool finish mode
  2169.   finish)
  2170.     modename="$modename: finish"
  2171.     libdirs="$nonopt"
  2172.  
  2173.     if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
  2174.       for dir
  2175.       do
  2176.         libdirs="$libdirs $dir"
  2177.       done
  2178.  
  2179.       for libdir in $libdirs; do
  2180.     if test -n "$finish_cmds"; then
  2181.       # Do each command in the finish commands.
  2182.       eval cmds=\"$finish_cmds\"
  2183.           IFS="${IFS=     }"; save_ifs="$IFS"; IFS=';'
  2184.           for cmd in $cmds; do
  2185.             IFS="$save_ifs"
  2186.             $show "$cmd"
  2187.             $run eval "$cmd"
  2188.           done
  2189.           IFS="$save_ifs"
  2190.     fi
  2191.     if test -n "$finish_eval"; then
  2192.       # Do the single finish_eval.
  2193.       eval cmds=\"$finish_eval\"
  2194.       $run eval "$cmds"
  2195.     fi
  2196.       done
  2197.     fi
  2198.  
  2199.     echo "------------------------------------------------------------------------------"
  2200.     echo "Libraries have been installed in:"
  2201.     for libdir in $libdirs; do
  2202.       echo "   $libdir"
  2203.     done
  2204.     echo
  2205.     echo "To link against installed libraries in a given directory, LIBDIR,"
  2206.     echo "you must use the \`-LLIBDIR' flag during linking."
  2207.     echo
  2208.     echo " You will also need to do one of the following:"
  2209.     if test -n "$shlibpath_var"; then
  2210.       echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
  2211.       echo "     during execution"
  2212.     fi
  2213.     if test -n "$runpath_var"; then
  2214.       echo "   - add LIBDIR to the \`$runpath_var' environment variable"
  2215.       echo "     during linking"
  2216.     fi
  2217.     if test -n "$hardcode_libdir_flag_spec"; then
  2218.       libdir=LIBDIR
  2219.       eval flag=\"$hardcode_libdir_flag_spec\"
  2220.  
  2221.       echo "   - use the \`$flag' linker flag"
  2222.     fi
  2223.     if test -f /etc/ld.so.conf; then
  2224.       echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
  2225.     fi
  2226.     echo
  2227.     echo "See any operating system documentation about shared libraries for"
  2228.     echo "more information, such as the ld(1) and ld.so(8) manual pages."
  2229.     echo "------------------------------------------------------------------------------"
  2230.     exit 0
  2231.     ;;
  2232.  
  2233.   # libtool execute mode
  2234.   execute)
  2235.     modename="$modename: execute"
  2236.  
  2237.     # The first argument is the command name.
  2238.     cmd="$nonopt"
  2239.     if test -z "$cmd"; then
  2240.       $echo "$modename: you must specify a COMMAND" 1>&2
  2241.       $echo "$help"
  2242.       exit 1
  2243.     fi
  2244.  
  2245.     # Handle -dlopen flags immediately.
  2246.     for file in $execute_dlfiles; do
  2247.       if test -f "$file"; then :
  2248.       else
  2249.     $echo "$modename: \`$file' is not a file" 1>&2
  2250.     $echo "$help" 1>&2
  2251.     exit 1
  2252.       fi
  2253.  
  2254.       dir=
  2255.       case "$file" in
  2256.       *.la)
  2257.         # Check to see that this really is a libtool archive.
  2258.         if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then :
  2259.         else
  2260.           $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  2261.           $echo "$help" 1>&2
  2262.           exit 1
  2263.         fi
  2264.  
  2265.     # Read the libtool library.
  2266.     dlname=
  2267.     library_names=
  2268.  
  2269.         # If there is no directory component, then add one.
  2270.     case "$file" in
  2271.     */* | *\\*) . $file ;;
  2272.         *) . ./$file ;;
  2273.     esac
  2274.  
  2275.     # Skip this library if it cannot be dlopened.
  2276.     if test -z "$dlname"; then
  2277.       # Warn if it was a shared library.
  2278.       test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
  2279.       continue
  2280.     fi
  2281.  
  2282.     dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  2283.     test "X$dir" = "X$file" && dir=.
  2284.  
  2285.     if test -f "$dir/$objdir/$dlname"; then
  2286.       dir="$dir/$objdir"
  2287.     else
  2288.       $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
  2289.       exit 1
  2290.     fi
  2291.     ;;
  2292.  
  2293.       *.lo)
  2294.     # Just add the directory containing the .lo file.
  2295.     dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  2296.     test "X$dir" = "X$file" && dir=.
  2297.     ;;
  2298.  
  2299.       *)
  2300.     $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
  2301.         continue
  2302.     ;;
  2303.       esac
  2304.  
  2305.       # Get the absolute pathname.
  2306.       absdir=`cd "$dir" && pwd`
  2307.       test -n "$absdir" && dir="$absdir"
  2308.  
  2309.       # Now add the directory to shlibpath_var.
  2310.       if eval "test -z \"\$$shlibpath_var\""; then
  2311.     eval "$shlibpath_var=\"\$dir\""
  2312.       else
  2313.     eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
  2314.       fi
  2315.     done
  2316.  
  2317.     # This variable tells wrapper scripts just to set shlibpath_var
  2318.     # rather than running their programs.
  2319.     libtool_execute_magic="$magic"
  2320.  
  2321.     # Check if any of the arguments is a wrapper script.
  2322.     args=
  2323.     for file
  2324.     do
  2325.       case "$file" in
  2326.       -*) ;;
  2327.       *)
  2328.         # Do a test to see if this is really a libtool program.
  2329.         if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then
  2330.       # If there is no directory component, then add one.
  2331.       case "$file" in
  2332.       */* | *\\*) . $file ;;
  2333.       *) . ./$file ;;
  2334.       esac
  2335.  
  2336.       # Transform arg to wrapped name.
  2337.       file="$progdir/$program"
  2338.     fi
  2339.         ;;
  2340.       esac
  2341.       # Quote arguments (to preserve shell metacharacters).
  2342.       file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
  2343.       args="$args \"$file\""
  2344.     done
  2345.  
  2346.     if test -z "$run"; then
  2347.       # Export the shlibpath_var.
  2348.       eval "export $shlibpath_var"
  2349.  
  2350.       # Now actually exec the command.
  2351.       eval "exec \$cmd$args"
  2352.  
  2353.       $echo "$modename: cannot exec \$cmd$args"
  2354.       exit 1
  2355.     else
  2356.       # Display what would be done.
  2357.       eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
  2358.       $echo "export $shlibpath_var"
  2359.       $echo "$cmd$args"
  2360.       exit 0
  2361.     fi
  2362.     ;;
  2363.  
  2364.   # libtool uninstall mode
  2365.   uninstall)
  2366.     modename="$modename: uninstall"
  2367.     rm="$nonopt"
  2368.     files=
  2369.  
  2370.     for arg
  2371.     do
  2372.       case "$arg" in
  2373.       -*) rm="$rm $arg" ;;
  2374.       *) files="$files $arg" ;;
  2375.       esac
  2376.     done
  2377.  
  2378.     if test -z "$rm"; then
  2379.       $echo "$modename: you must specify an RM program" 1>&2
  2380.       $echo "$help" 1>&2
  2381.       exit 1
  2382.     fi
  2383.  
  2384.     for file in $files; do
  2385.       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  2386.       test "X$dir" = "X$file" && dir=.
  2387.       name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  2388.  
  2389.       rmfiles="$file"
  2390.  
  2391.       case "$name" in
  2392.       *.la)
  2393.         # Possibly a libtool archive, so verify it.
  2394.         if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then
  2395.           . $dir/$name
  2396.  
  2397.           # Delete the libtool libraries and symlinks.
  2398.           for n in $library_names; do
  2399.             rmfiles="$rmfiles $dir/$n"
  2400.             test "X$n" = "X$dlname" && dlname=
  2401.           done
  2402.           test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname"
  2403.           test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
  2404.  
  2405.       $show "$rm $rmfiles"
  2406.       $run $rm $rmfiles
  2407.  
  2408.       if test -n "$library_names"; then
  2409.         # Do each command in the postuninstall commands.
  2410.         eval cmds=\"$postuninstall_cmds\"
  2411.         IFS="${IFS=     }"; save_ifs="$IFS"; IFS=';'
  2412.         for cmd in $cmds; do
  2413.           IFS="$save_ifs"
  2414.           $show "$cmd"
  2415.           $run eval "$cmd"
  2416.         done
  2417.         IFS="$save_ifs"
  2418.       fi
  2419.  
  2420.           if test -n "$old_library"; then
  2421.         # Do each command in the old_postuninstall commands.
  2422.         eval cmds=\"$old_postuninstall_cmds\"
  2423.         IFS="${IFS=     }"; save_ifs="$IFS"; IFS=';'
  2424.         for cmd in $cmds; do
  2425.           IFS="$save_ifs"
  2426.           $show "$cmd"
  2427.           $run eval "$cmd"
  2428.         done
  2429.         IFS="$save_ifs"
  2430.       fi
  2431.  
  2432.           # FIXME: should reinstall the best remaining shared library.
  2433.         fi
  2434.         ;;
  2435.  
  2436.       *.lo)
  2437.         if test "$build_old_libs" = yes; then
  2438.           oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/\.o/'`
  2439.           rmfiles="$rmfiles $dir/$oldobj"
  2440.         fi
  2441.     $show "$rm $rmfiles"
  2442.     $run $rm $rmfiles
  2443.         ;;
  2444.  
  2445.       *)
  2446.           $show "$rm $rmfiles"
  2447.     $run $rm $rmfiles
  2448.     ;;
  2449.       esac
  2450.     done
  2451.     exit 0
  2452.     ;;
  2453.  
  2454.   "")
  2455.     $echo "$modename: you must specify a MODE" 1>&2
  2456.     $echo "$generic_help" 1>&2
  2457.     exit 1
  2458.     ;;
  2459.   esac
  2460.  
  2461.   $echo "$modename: invalid operation mode \`$mode'" 1>&2
  2462.   $echo "$generic_help" 1>&2
  2463.   exit 1
  2464. fi # test -z "$show_help"
  2465.  
  2466. # We need to display help for each of the modes.
  2467. case "$mode" in
  2468. "") $echo \
  2469. "Usage: $modename [OPTION]... [MODE-ARG]...
  2470.  
  2471. Provide generalized library-building support services.
  2472.  
  2473. -n, --dry-run         display commands without modifying any files
  2474.     --features        display configuration information and exit
  2475.     --finish          same as \`--mode=finish'
  2476.     --help            display this help message and exit
  2477.     --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
  2478.     --quiet           same as \`--silent'
  2479.     --silent          don't print informational messages
  2480.     --version         print version information
  2481.  
  2482. MODE must be one of the following:
  2483.  
  2484.       compile         compile a source file into a libtool object
  2485.       execute         automatically set library path, then run a program
  2486.       finish          complete the installation of libtool libraries
  2487.       install         install libraries or executables
  2488.       link            create a library or an executable
  2489.       uninstall       remove libraries from an installed directory
  2490.  
  2491. MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
  2492. a more detailed description of MODE."
  2493.   exit 0
  2494.   ;;
  2495.  
  2496. compile)
  2497.   $echo \
  2498. "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
  2499.  
  2500. Compile a source file into a libtool library object.
  2501.  
  2502. COMPILE-COMMAND is a command to be used in creating a \`standard' object file
  2503. from the given SOURCEFILE.
  2504.  
  2505. The output file name is determined by removing the directory component from
  2506. SOURCEFILE, then substituting the C source code suffix \`.c' with the
  2507. library object suffix, \`.lo'."
  2508.   ;;
  2509.  
  2510. execute)
  2511.   $echo \
  2512. "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
  2513.  
  2514. Automatically set library path, then run a program.
  2515.  
  2516. This mode accepts the following additional options:
  2517.  
  2518.   -dlopen FILE      add the directory containing FILE to the library path
  2519.  
  2520. This mode sets the library path environment variable according to \`-dlopen'
  2521. flags.
  2522.  
  2523. If any of the ARGS are libtool executable wrappers, then they are translated
  2524. into their corresponding uninstalled binary, and any of their required library
  2525. directories are added to the library path.
  2526.  
  2527. Then, COMMAND is executed, with ARGS as arguments."
  2528.   ;;
  2529.  
  2530. finish)
  2531.   $echo \
  2532. "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
  2533.  
  2534. Complete the installation of libtool libraries.
  2535.  
  2536. Each LIBDIR is a directory that contains libtool libraries.
  2537.  
  2538. The commands that this mode executes may require superuser privileges.  Use
  2539. the \`--dry-run' option if you just want to see what would be executed."
  2540.   ;;
  2541.  
  2542. install)
  2543.   $echo \
  2544. "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
  2545.  
  2546. Install executables or libraries.
  2547.  
  2548. INSTALL-COMMAND is the installation command.  The first component should be
  2549. either the \`install' or \`cp' program.
  2550.  
  2551. The rest of the components are interpreted as arguments to that command (only
  2552. BSD-compatible install options are recognized)."
  2553.   ;;
  2554.  
  2555. link)
  2556.   $echo \
  2557. "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
  2558.  
  2559. Link object files or libraries together to form another library, or to
  2560. create an executable program.
  2561.  
  2562. LINK-COMMAND is a command using the C compiler that you would use to create
  2563. a program from several object files.
  2564.  
  2565. The following components of LINK-COMMAND are treated specially:
  2566.  
  2567.   -all-static       do not do any dynamic linking at all
  2568.   -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
  2569.   -dlpreopen FILE   link in FILE and add its symbols to dld_preloaded_symbols
  2570.   -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
  2571.   -LLIBDIR          search LIBDIR for required installed libraries
  2572.   -lNAME            OUTPUT-FILE requires the installed library libNAME
  2573.   -no-undefined     declare that a library does not refer to external symbols
  2574.   -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
  2575.   -release RELEASE  specify package release information
  2576.   -rpath LIBDIR     the created library will eventually be installed in LIBDIR
  2577.   -static           do not do any dynamic linking of libtool libraries
  2578.   -version-info CURRENT[:REVISION[:AGE]]
  2579.                     specify library version info [each variable defaults to 0]
  2580.  
  2581. All other options (arguments beginning with \`-') are ignored.
  2582.  
  2583. Every other argument is treated as a filename.  Files ending in \`.la' are
  2584. treated as uninstalled libtool libraries, other files are standard or library
  2585. object files.
  2586.  
  2587. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only
  2588. library objects (\`.lo' files) may be specified, and \`-rpath' is required.
  2589.  
  2590. If OUTPUT-FILE ends in \`.a', then a standard library is created using \`ar'
  2591. and \`ranlib'.
  2592.  
  2593. If OUTPUT-FILE ends in \`.lo' or \`.o', then a reloadable object file is
  2594. created, otherwise an executable program is created."
  2595.   ;;
  2596.  
  2597. uninstall)
  2598.   $echo
  2599. "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
  2600.  
  2601. Remove libraries from an installation directory.
  2602.  
  2603. RM is the name of the program to use to delete files associated with each FILE
  2604. (typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
  2605. to RM.
  2606.  
  2607. If FILE is a libtool library, all the files associated with it are deleted.
  2608. Otherwise, only FILE itself is deleted using RM."
  2609.   ;;
  2610.  
  2611. *)
  2612.   $echo "$modename: invalid operation mode \`$mode'" 1>&2
  2613.   $echo "$help" 1>&2
  2614.   exit 1
  2615.   ;;
  2616. esac
  2617.  
  2618. echo
  2619. $echo "Try \`$modename --help' for more information about other modes."
  2620.  
  2621. exit 0
  2622.  
  2623. # Local Variables:
  2624. # mode:shell-script
  2625. # sh-indentation:2
  2626. # End:
  2627.